1. Field of the Invention
This invention relates to a method of and apparatus for detecting the presence of objects moving along an assembly line, and more particularly relates to a method of and apparatus for detecting objects by using image analysis in which signals representing images received through a TV camera are processed or converted to values greater than and less than a threshold value, and then the thus converted signals are formed into a black and white image which is compared with a pre-memorized image to indicate that a certain object has been detected.
2. Description of the Prior Art
In a conventional way of detecting the presence of an object moving along an assembly line, for example, a rear door panel of a vehicle, image signals of a feature of the object, such as a hole or holes, from a TV camera are compared with a predetermined threshold value, and image signals having larger values than the threshold value are classified as or converted to white color signals, and the rest of the image signals are classified as or converted to black signals. By thus converting the signals with many different values to signals of only two values, a monochrome image is obtained. This monochrome image is compared with a pre-memorized image of the feature. The pre-memorized image has several characteristic features such as an area, a diameter, a circular configuration, etc. The detection of the objects is performed by identifying a viewed image most similar to the pre-memorized image of the identifying feature.
However, such a method sometimes encounters difficulty in accurately or immediately identifying the objects. This problem occurs particularly when some conditions under which the object is detected changes, such as for example, the color or configuration of the identifying feature, the brightness of lighting, and so on. Because these conditions are subject to change in actual practice this problem is a serious one.
This problem will be explained in greater detail with reference to FIGS. 1a-1c.
FIG. 1a shows a case in which the color of the area in which the feature, in this case a hole, is present is a bright color. The image signal of the bright color area has a high level of A1--A1'. The image signal of the hole has a low level of B1--B1'. The difference between these two levels is great. This means that proper setting of the threshold value is important or essential for accurate detection. The threshold value should be set to a level of S1--S1', in this case to give a hole image signal of B--B', to accurately identify the characteristic feature of the object, in this case the diameter of the circular image of the hole.
On the other hand, the threshold value of a level of S2--S2', is the ideal value for the case in which the color is a dark color, as shown in FIG. 1c. If this threshold value is used for a bright background, the feature in the light color area may be mistakenly identified as another feature, i.e., another hole having a smaller diameter B1--B1', see FIG. 1a. On the contrary, if the threshold value of S1--S1' is used where there is a dark color background, nothing will be detected as shown in FIG. 1b.
Therefore, the setting of the threshold value seriously affects the accuracy of detecting the objects by means of an image analysis.
To improve quality of the image analysis, Japanese Laid-Open Patent Application No. 62-180,204 of Aug. 7, 1987 proposes to detect the change of brightness of the lighting and to adjust the threshold level for the image analysis. However, such a system requires an additional sensor for detecting the brightness change. Moreover, it may not work in case of a color change of the object or mutual change of location between the TV camera and the object.
Moreover, where two features are used to give a clear identification of the object, where a first feature is identified by repeated comparisons of the black and white image of the first feature with the pre-memorized image, to repeat this effort for the second feature can be very time consuming, relatively speaking.